var a=document.createEvent("MouseEvents");
a.initEvent("click", true, true);
var element = document.getElementsByClassName('ww-inline ww-online')
var name;
if(element.length!=0){
  name = element[0].parentElement.getAttribute('data-nick');
}

var timer = window.setInterval(function(){
	var new_element =document.getElementsByClassName('ww-inline ww-online');
	var new_name;
	if(new_element.length!=0){
  	   new_name = new_element[0].parentElement.getAttribute('data-nick');
	}
       // console.log(new_name)
	if(name!=new_name){
       var z = document.getElementsByClassName('button-mod__button___2Ew0a button-mod__primary___TqWy8');
       if(z.length!=0){
           z[0].dispatchEvent(a);
       }
　　　　// document.getElementsByClassName('button-mod__button___2Ew0a button-mod__primary___TqWy8')[0].dispatchEvent(a);
       var q = document.getElementsByClassName('ww-inline ww-online');
       if(q.length!=0){
          q[0].dispatchEvent(a);
       }
	   // document.getElementsByClassName('ww-inline ww-online')[0].dispatchEvent(a);
	   name = new_name;
       console.log(name);
       console.clear();
	}else{
	  document.getElementsByClassName('button-mod__button___2Ew0a button-mod__primary___TqWy8')[0].dispatchEvent(a);
	}
   
},1400);